from django.db import models


# Create your models here.
class StuInfo(models.Model):
    username = models.CharField(max_length=60, unique=True, verbose_name='姓名')
    score = models.IntegerField(verbose_name='成绩')
    classroom = models.CharField(max_length=50, verbose_name='班级')
    skills = models.CharField(max_length=300, verbose_name='技能')
    desc = models.CharField(max_length=500, verbose_name='个人简介')

    def __str__(self):
        return f'姓名[{self.username}],成绩[{self.score}],班级[{self.classroom}],' \
            f'技能[{self.skills}],个人简介[{self.desc}]'

    class Meta:
        db_table = 'stuinfo'
